<!DOCTYPE HTML>
<html class="theme">
<head>
  <title>{% block title %}{{siteInfo.title}}{% endblock %}</title>
  <meta name="viewport" content="width=device-width,user-scalable=no">
  <link rel="icon" href="/static/blog/image/favicon.ico">
  <link rel="stylesheet" href="/blog/static/css/common/reset.css" type="text/css">
  <link rel="stylesheet" href="/blog/static/css/common/layout.css" type="text/css">
  <script src="/blog/static/js/common/jquery-2.1.3.min.js" type="text/javascript"></script>
  {% block head %}{% endblock %}
</head>

<body>
  {% block body %}
  <header class="header" id="header">
    <div class="header-container">
      <ul class="nav">
        <li class="nav-list {% if siteInfo.path=='/home' %}actived{% endif %}"><a class="nav-item" href="/home">首页</a></li>
        <li class="nav-list {% if siteInfo.path=='/home/about' %}actived{% endif %}"><a class="nav-item" href="http://qd.qufenqi.com">关于</a></li>
        <li class="nav-list {% if siteInfo.path=='/home/join' %}actived{% endif %}"><a class="nav-item" href="http://feclub.cn/post/content/join_us">加入</a></li>
      </ul>
      <div class="user">
        {% if !userInfo.id %}
          <a class="user-login" href="/user/login"><i class="icon-github"></i><span> 通过github登录</span></a> 
        {% else %}
          <div class="user-panel">
      		  <a class="user-name" href="#">
              <img src="/user/avatar?img={{userInfo.avatar}}" class="user-name-img">
              <span class="user-name-text">{{userInfo.nickname}}</span>
            </a>
      		  <ul class="user-opera">
      	      {% if userInfo.isAuthor%}
              <li class="user-opera-list"><a class="user-opera-item" href="/dashboard/site/home">管理后台</a></li>
              {% endif %}
      		  	<li class="user-opera-list"><a class="user-opera-item" href="{{userInfo.blog}}" target="_blank">我的博客</a></li>
      		  	<li class="user-opera-list"><a class="user-opera-item" href="{{userInfo.github}}" target="_blank">我的Github</a></li>
      		  	<li class="user-opera-list"><a class="user-opera-item" href="/user/logout">退出</a></li>
      		  </ul>
  	      </div> 
  	    {% endif %}
      </div>
    </div>
    <div class="logo">
      <h1>前端俱乐部</h1>
      <span>feclub.cn</span>
    </div>
    <div class="search">
      <div class="search-container">
        <div class="search-tips">
          <p><i class="icon-quote-left"></i> 本网站由<a href="https://github.com/xiongwilee/Gracejs" target="_blank">Gracejs</a>强力驱动 <i class="icon-quote-right"></i></p>
        </div>
        <form class="search-form" id="search_form" action="https://www.baidu.com/s?ie=UTF-8">
          <input type="text"  id="search_form_wd">
          <input type="hidden" id="search_form_wd_hidden" name="wd">
          <i class="icon-search"></i>
        </form>
      </div>
    </div>
  </header>
  <section class="main">
    <div class="main-container clearfix">
      {% block main %}
      <div class="sidebar">
        <div class="side-item side-item-cate">
          <h3 class="side-title">分类</h3>
          <ul class="side-ul">
            {% for cate in siteInfo.cates %}
              <li>
                <a href="/post/cate/{{cate.id}}" class="side-ul-item">
                  <i class="icon-circle-arrow-right"></i><span class="item-name"> {{ cate.name }}</span><span class="item-numb">（{{ cate.numb||'0' }}）</span>
                </a>
              </li>
            {% endfor %}
          </ul>
        </div>
        <div class="side-item side-item-user">
          <h3 class="side-title">作者</h3>
          <ul class="side-ul">
            {% for user in siteInfo.users %}
            {% if user.isAuthor%}
              <li>
                <a href="{{user.blog||user.github}}" class="side-ul-item clearfix" target="_blank">
                  <img src="/user/avatar?img={{user.avatar}}" class="item-img">
                  <span class="item-nickname">{{ user.nickname }}</span>
                  <span class="item-blog">{{ user.blog || user.github }}</span>
                </a>
              </li>
            {% endif %}
            {% endfor %}</ul>
        </div>
        <div class="side-item side-item-link">
          <h3 class="side-title">链接</h3>
          <ul class="side-ul">
            {% for link in siteInfo.links %}
              <li>
                <a href="{{link.href}}" class="side-ul-item">
                  <span class="item-name"> {{ link.name }}</span>
                </a>
              </li>
            {% endfor %}
          </ul>
        </div>
        <!-- <div class="side-item">
          <h3 class="side-title">标签</h3>
          <ul class="side-ul"></ul>
        </div> -->
      </div>
      <div class="content">
        {% block content %}
          <p>Missing content!</p>
        {% endblock %}
      </div>
      {% endblock %}
    </div>
  </section>
  <footer class="footer">
    <div class="footer-container">
      <p>Copyright © {{siteInfo.year}} feclub.cn All rights reserved.</p>
    </div>
  </footer>
  {% endblock %}
  <link rel="stylesheet" href="/blog/static/css/lib/awesome/css/font-awesome.css" type="text/css">
  {% block foot %}
  <script src="/blog/static/js/common/layout.js" type="text/javascript"></script>
  {% endblock %}
  <script>
  var _hmt = _hmt || [];
  (function() {
    var hm = document.createElement("script");
    hm.src = "//hm.baidu.com/hm.js?bd30f92879b673d77b4b4565195e035a";
    var s = document.getElementsByTagName("script")[0]; 
    s.parentNode.insertBefore(hm, s);
  })();
  </script>
</body>
</html>
